package com.hexiang.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.remoting.caucho.HessianProxyFactoryBean;

import com.hexiang.service.HelloWorldService;

@Configuration
public class HessianConfig {
    @Bean
    public HessianProxyFactoryBean helloClient() {
        HessianProxyFactoryBean factory = new HessianProxyFactoryBean();
        factory.setServiceUrl("http://127.0.0.1:8080/HelloWorldService");
        factory.setServiceInterface(HelloWorldService.class);
        return factory;
    }
}
